Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix draft watermark for short content #895

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

gpeng
Copy link
Contributor

@gpeng gpeng commented Feb 8, 2017

Some content is clipping the draft background watermark. This commit adds background-size: contain to avoid this.

Before:
screen shot 2017-02-08 at 18 20 36

After:
screen shot 2017-02-08 at 18 21 07

Before:
screen shot 2017-02-08 at 18 25 03

After:
screen shot 2017-02-08 at 18 25 20

I've not tested the effect on IE so would welcome an opinion on that.

/cc @fofr (thanks for the pointer on how to fix), @NickColley

@NickColley
Copy link
Contributor

You can see that contain is only supported in IE9+ (https://developer.mozilla.org/en/docs/Web/CSS/background-size)

So I'd look at using a fallback some variation of background-size: 100%

Also, how does this work with print styles, is this respected?

@fofr
Copy link
Contributor

fofr commented Feb 9, 2017

@NickColley Printing does print background images.

@36degrees
Copy link
Contributor

I've changed the required status checks for this repo. You'll need to rebase this branch against master so that this branch gets a Jenkinsfile can be built against new CI.

@fofr
Copy link
Contributor

fofr commented Feb 9, 2017

Pragmatically I think this is an enhancement and we don't need a fallback. IE8 has functional support.

@NickColley
Copy link
Contributor

NickColley commented Feb 9, 2017

Since the biggest issue is on smaller viewports and they tend to be mobile clients that have support for contain, I'd say 👍 :shipit:

Some content is clipping the draft background watermark. This commit
adds `background-size: contain` to avoid this.
@gpeng gpeng force-pushed the fix-draft-background-for-short-content branch from 9f3f191 to 20d906e Compare February 9, 2017 15:05
@gpeng
Copy link
Contributor Author

gpeng commented Feb 9, 2017

Thanks all. Post approval commit is just a rebase to pick up @36degrees's Jenkins business...

@gpeng gpeng merged commit dbd28a0 into master Feb 9, 2017
@gpeng gpeng deleted the fix-draft-background-for-short-content branch February 9, 2017 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants